"""
通用Schemas - 通用响应模型和枚举
"""
from pydantic import BaseModel, Field
from typing import Optional
from enum import Enum


class ParameterType(str, Enum):
    """参数类型枚举"""
    INTEGER = "integer"
    FLOAT = "float"
    BOOLEAN = "boolean"
    STRING = "string"


class BackupType(str, Enum):
    """备份类型枚举"""
    FULL = "full"
    PROJECT = "project"


# 通用响应模型
class MessageResponse(BaseModel):
    message: str = Field(..., description="响应消息")
    success: bool = Field(True, description="是否成功")


class ErrorResponse(BaseModel):
    detail: str = Field(..., description="错误详情")
    error_code: Optional[str] = Field(None, description="错误代码")

